Multiple backgrounds

ABSTRACT

A method for monitoring a monitored area comprising the steps of recording an image of the monitored area and of comparing the recorded image with a reference image in order to determine whether there is an alarm situation. The method further comprises the step of creating the reference image by combining at least two previously stored images from a set of images, so that the lighting conditions in the reference image are adjusted to the lighting conditions in the recorded image.

TECHNICAL FIELD

[0001] The present invention relates to a method for monitoring a monitored area, comprising the steps of recording an image of the monitored area and of comparing the recorded image with a reference image in order to determine if there is an alarm situation. The invention further relates to a monitoring unit and a computer program.

TECHNICAL BACKGROUND

[0002] The use of cameras for various types of monitoring, both in industry and in private dwellings, is already known. The aim of the monitoring is often to prevent burglary and theft.

[0003] The camera takes pictures of a monitored area. The monitored area is limited by the optics of the camera. The recorded images are analyzed for an evaluation of their content to be made. If the camera monitors, for example, premises in which people are not permitted, an analysis is made of the recorded image and an evaluation made whether there is an extraneous object within the monitored area or not.

[0004] In a monitoring context the term scene is used. The scene changes, for example, is something moves physically within the monitored area, for example if a person enters the monitored area. On the other hand, the scene does not change if the light in the monitored area changes. If a change of scene is detected, it can be determined that there is an alarm situation.

[0005] The analysis of the recorded images can be carried out manually, by a person looking at a recorded image and making a visual evaluation about whether there is an intruder in the monitored area or not. If an intruder is discovered on a recorded image, the monitoring personnel who carries out the evaluation can, for example, telephone the police for further measures to be taken. This is an expensive form of monitoring, as it requires a person to go through the recorded images. Even if the person who carries out the evaluation of the recorded images can evaluate and monitor several monitored areas at the same time, it is time-consuming and very monotonous and stressful work, as an “event” that is not permitted must not be missed in the recorded images. In addition to an intruder entering a building, an event that is not permitted can be an incorrectly manufactured bottle in a production line.

[0006] The analysis of the recorded images is therefore carried out to an increasing extent by means of digital image processing. In order to discover, for example, an intruder in a recorded image, the recorded image is compared with a reference image, which can be a background image that was recorded on a previous occasion when there was no intruder in the monitored area. The reference image can also be the immediately preceding recorded image. If there is a difference between the two compared images this can mean that there is an intruder in the monitored area. The difference can also be due to changes in the light in the monitored area, which for instance can arise when the sun goes behind a cloud, when it starts to get dark or when a light is switched on. One way of reducing the problem caused by changes in the light is to detect which changes concern changes in the light and which concern changes in the scene. This is solved by using different criteria for which changes in intensity are the result of changes in the light and which are the result of changes in the scene. This is a difficult problem to solve. The algorithms that are used are very complicated and take a long time to process.

[0007] Another problem of the prior-art technique is if changes in the light give rise to changes in intensity that do not follow the said criteria for changes in intensity. This occurs, for example, when there are objects in the scene that cast shadows. In this case, the changes in the light will be one way in the shadow and another way alongside.

SUMMARY OF THE INVENTION

[0008] An object of the present invention is therefore to provide a method that avoids the above-mentioned problems.

[0009] This object and other objects which will be apparent from the following description are achieved, according to a first aspect of the present invention, by a method, which is of the type described by way of introduction and is characterized by the step of creating the reference image by combining at least two previously stored images of a set of images, so that the lighting conditions in the reference image is adjusted to the lighting conditions in the recorded image.

[0010] Instead of first comparing the recorded image and the reference image to determine whether the image has changed and then deciding whether the change is an alarm situation or a change in the light, the changes in the light are now considered before the comparison is made. This is carried out by having previously stored images which can be combined and in this way can recreate the lighting conditions in the reference image. A new reference image can be created before each comparison with a recorded image. It is also possible to use the preceding reference image when the next image of the monitored area is recorded and is to be compared with a reference image. For example, a new reference image can be recreated every couple of minutes, or every fifth, tenth or hundredth time an image is recorded and is to be compared with a reference image. An advantage of the present invention is that an optimal reference image is obtained in a simple and quick way, which reference image takes the lighting conditions into account. This means that the step of comparing the recorded image and the reference image becomes simpler and requires less complex algorithms than must be used, for example, for the classification of areas according to changes in the light and changes in the scene. This also has the advantage that less memory is required. This is particularly important when there is limited processing capacity, which is the case in a system with distributed intelligence. Distributed intelligence means that an analysis of the recorded image is carried out in a monitoring unit at the monitored area to determine whether there is an alarm situation.

[0011] The result of the comparison is also more reliable as the risk of a false detection is reduced when a reference image according to the invention is used.

[0012] The monitoring can, for example, be carried out in premises where valuable documents are stored and in which people are not permitted, and aims at detecting whether a person is in the room or not. In order to be able to detect a person, an image is recorded and the area which the image covers is called the monitored area. The recorded image is compared with a reference image in order to discover whether a person has entered the monitored area. The reference image is an image that represents the background of the monitored area at the time of recording the image. The background of the monitored area can be declared as the monitored area when no object that can cause an alarm is in the monitored area, that is to say when the monitored area is undisturbed. The reference image is created by combining images which are stored in a set of images, so that the reference image is adjusted to the prevalent lighting conditions in the recorded image. The image information in the reference image is adjusted to the image information in the recorded image. The image information comprises the light intensity in the pixels of the image. The images in the set of images do not need to correspond individually to an actual light level for the scene. What is important is that it is possible to create a reference image for as many different types of light level as possible from a limited number of images. It can be possible to update the set of images when the lighting conditions in the recorded image cannot be recreated in the reference image from the set of images.

[0013] By combining images in a set of images, it is also possible to take into account shadows from fixed objects, which shadows are included in the reference image.

[0014] Another advantage is that the monitoring system is more robust and less sensitive to interference when the reference image is adjusted immediately to the prevalent lighting conditions and does not detect these separately afterwards.

[0015] In another preferred embodiment, the reference image is created by linear combination of said at least two images.

[0016] Linear combination means that a coefficient is calculated for each image in the set of images and the linear combination is created based on the calculated coefficients.

[0017] In order to adjust the reference image to the recorded image as well as possible, it is possible to use an algorithm that attempts to find the linear combination of the images in the set of images that conforms as well as possible to the light level in the recorded image.

[0018] In a further preferred embodiment, the method further comprises in addition the steps of calculating a difference image as the difference between the reference image and the recorded image, determining at least one divergence area in the difference image in which at least certain pixels exceed a particular level, determining whether the divergence area represents a scene change and, if the divergence area represents a scene change, taking out the pixels that correspond to the divergence area in the recorded image, for the creation of the next reference image, or in the reference image, before comparison with the recorded image.

[0019] The difference image can be derived as the difference in intensity between each pixel in the recorded image with each corresponding pixel in the reference image. By means of the difference image, it is possible to see whether, and if so where, there is a difference between the recorded image and the reference image. These differences can be apparent as a divergence area, which can be a number of pixels that exceed a predetermined threshold value and which are adjacent to each other. The number of divergence areas can be none, one or more. These divergence areas can be caused by scene changes, but they can also be caused, for example, by changes in the light. In order for an area in the difference image to be called a divergence area, there can be various criteria that have to be fulfilled. Examples of such criteria can be that the area must be of a certain size, that is it must occupy at least a predetermined number of pixels and/or that the intensity difference in a pixel in the recorded image and the reference image must exceed a particular level. Other criteria can, for example, be the shape of the area, that is to say how the pixels that exceed the threshold value abut each other.

[0020] If the divergence area is due to a scene change, this scene change will most probably be repeated in the next recorded image. In order to create as good a reference image as possible for this next recorded image, pixels corresponding to those that the divergence area occupies in the difference area are removed from the recorded image. The divergence area advantageously also comprises pixels that abut the pixels that fulfil one or more criteria for constituting a divergence area. By also removing these pixels, it is taken into account that the scene change may have moved in the monitored area before the recording of the next image. In this way, an even better reference image is obtained. How much the divergence area is enlarged can depend, for example, on how quickly it is expected that detected scene changes can move in the monitored area.

[0021] The removed pixels are given a light level that is dependent upon the light level of the other pixels and an estimate of the lighting conditions in the area occupied by the scene change is obtained.

[0022] An advantage of this method is that the reference image is created based on the prevalent lighting conditions without interference from scene changes.

[0023] A further advantage of this method is that a better reference image is obtained and that it is thus easier to detect objects in the recorded image.

[0024] Another advantage is that also less advanced algorithms are required, which in turn means that the calculation requires less processing capacity and less memory.

[0025] In one embodiment according to the invention, the method comprises the steps of determining whether the divergence area represents a change in the light and of updating the set of images if the divergence area represents a change in the light.

[0026] If the divergence area represents a change in the light, the light level in the recorded image could not be recreated from the set of images. New lighting conditions have been detected and the set of images is updated with these new lighting conditions. If the image differs significantly from the previous set of images, the base must be increased by a new image, but advantageously not with precisely the recorded image. Instead, what is important is that the new lighting conditions can be recreated with the set of images. The new set of images can be derived by using the recorded image plus the original set of images and performing a single value division (SVD). There are also other algorithms that can be used in this connection, such as the Grahm-Schmidt algorithm. If the base is orthogonal and the set of images is to be updated with a new image that corresponds to new lighting conditions, it is not sufficient simply to add the recorded image, as we wish to retain the orthogonal base. What is important is instead to be able to recreate the new lighting conditions with the new base. Using, for example, SVD it is possible to synthesize an image which is orthogonal to the others in the set of images.

[0027] According to a further preferred embodiment, the method comprises the step of updating the set of images if the divergence area represents a scene change and if the same scene change is detected in a predetermined number of successively recorded images.

[0028] Such a scene change is a persistent change and can, for example, be a flower-pot that has fallen on the floor. These persistent changes can be said to be non-critical changes of the scene. The number of images that is required in order to determine whether a persistent scene change has occurred is a matter of judgement. The number of images can also be measured in time as images can be recorded at predetermined intervals. It must not be the case that a burglar can be designated as a persistent scene change simply because he moves very slowly. For example, if a camera takes 10 images per second and a persistent scene change is defined as a change which lasts for one minute (or for three minutes) the number of images is 600. The updating can be carried out in such a way that a new set of images is created by discarding the old base and letting the most recently recorded image form a new set of images, which initially consists of only this one image.

[0029] The scene change can also be incorporated gradually, whereas updating for a new light level should be carried out more rapidly.

[0030] An advantage of this method is that a more correct reference image can be created.

[0031] In a preferred embodiment the step of determining whether the divergence area represents a scene change comprises calculating the variance of the divergence area, and if the variance exceeds a predetermined value it is determined that the divergence area represents a scene change.

[0032] The variance of a divergence area in the difference image is calculated. If the variance is large, it is a scene change. If the variance is small, the divergence area can, for example, be judged to be due to a change in the lighting. An advantage of using the variance to determine which type of change has occurred is that it is a simple method.

[0033] In another embodiment, at least the outermost edge of pixels in the recorded image is omitted when creating the reference image.

[0034] It is an advantage not to include the outermost edge or edges of pixels when calculating the reference image, as, for example, an intruder will appear first at the edge of the image. This interference will then not be included in the creation of the reference image and therefore will not affect the reference image.

[0035] In a preferred embodiment, the stored images are stored in a set of images at different resolutions.

[0036] An advantage of this is that it saves memory capacity, which is normally limited in a monitoring system. It is normally sufficient to store one or a few images at full resolution and the others at a considerably lower resolution.

[0037] In an embodiment according to the invention, the step of creating the set of images further comprises recording images of the monitored area in different lighting conditions and storing one or more of these recorded images.

[0038] When the monitoring system is put into operation, a very large set of light levels can be stored in the set of images. One way of creating such a set of images is to take a sequence of images when starting up the system. This sequence of images can be taken over a predetermined period of time. During this time the light level varies as much as possible. An advantage of using such a set of images is that when there is a difference between the recorded image and the reference image, it can be determined straight away whether the difference is a scene change. A further advantage of this way of creating the set of images is that the derivation of a reference image from the set of images is quick and easy to carry out. It can also be possible to update this type of set of images if new lighting conditions arise.

[0039] In one embodiment, the step of updating the set of images is carried out at predetermined intervals.

[0040] The whole set of images can advantageously be updated over time in order to prevent the set of images from becoming too large. That is to say that the set of images is updated so that it does not include lighting conditions that are not relevant. A time factor determines how long a time it is to take for the change to be incorporated in the base. For example, the updating can be carried out once an hour.

[0041] In a preferred embodiment of the invention, said at least two images in the set of images are stored orthogonally.

[0042] Storing images orthogonally means that the scalar product of each matrix that represents an image with itself is equal to one and that its scalar product with every other matrix that represents an image is equal to zero.

[0043] An advantage of storing the set of images as an orthogonal base is that a large number of light variations can be captured in a limited number of images. For example, the continuum of light variations produced by a dimmer can be captured with only two base images.

[0044] Another advantage of using an orthogonal base is that it is simpler and quicker to derive a reference image. The algorithms that are used can therefore be less complex and processing power is saved.

[0045] A further advantage is that there are effective algorithms for updating the orthogonal base when new lighting conditions are detected.

[0046] In an advantageous embodiment, the set of images comprises an image in which all the pixels have the same intensity.

[0047] An image in which all the pixels have the same intensity, that is to say that all the pixels have the same grayscale value, can be called a constant image. With a constant image, it is easy to capture variations where the whole scene is illuminated in the same way. Another advantage arises when intensity variations arise due, for example, to the exposure time being changed, as by using the constant image a monitoring unit can handle these settings automatically. This means that time-consuming manual settings are not required. A further advantage of using a constant image in comparison to, for example, calculating the intensity value of all the pixels with the same value, is that the calculation is quicker and easier.

[0048] According to a second aspect of the present invention, this relates to a monitoring unit for monitoring a monitored area, comprising a light-sensitive sensor which is arranged to record an image of the monitored area, and a central processing unit which is arranged to compare the recorded image with a reference image in order to determine whether there is an alarm situation, the central processing unit being further arranged to create a reference image by combining at least two previously stored images from a set of images, so that the lighting conditions in the reference image are adjusted to the lighting conditions in the recorded image.

[0049] The advantages of this monitoring unit are apparent from the discussion above.

[0050] According to third aspect of the present invention, this relates to a computer program for image processing when monitoring a monitored area, which computer program is stored on a computer-readable memory medium which comprises instructions for causing the computer to record an image of the monitored area and to compare the recorded image with a reference image in order to determine whether there is an alarm situation, which causes the computer to create a reference image by combining at least two previously stored images from a set of images, so that the lighting conditions in the reference image are adjusted to the lighting conditions in the recorded image.

[0051] The advantages of the computer program are apparent from the discussion above. The program is primarily intended to be installed in a monitoring unit which monitors a monitored area.

BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In the following, the invention will be described in greater detail with reference to the accompanying drawings, in which

[0053]FIG. 1 shows schematically a block diagram of a monitoring unit according to the present invention,

[0054]FIG. 2 shows a set of images according to the present invention,

[0055]FIG. 3 is a flow chart showing a method according to the invention,

[0056]FIG. 4 is a flow chart showing an embodiment of a method according to the invention, and

[0057]FIG. 5 is a flow chart showing an additional embodiment of a method according to the invention.

DESCRIPTION OF A PREFERRED EMBODIMENT

[0058]FIG. 1 shows schematically a monitoring unit 1, which comprises a light-sensitive sensor 2 with an associated lens arrangement 3 which together are arranged to continuously record images of a monitored area. The monitored area can, for example, be premises in which people are not permitted. The monitoring unit 1 further comprises a central processing unit 4, which is arranged to process image information, a memory 5, in which previously recorded images can be stored, and a communication unit 6 for communication with an external unit. This communication can be carried out wirelessly. The external unit can, for example, be a central alarm center to which information is sent if an alarm situation arises, which in the example mentioned above would be if a person were to enter the monitored premises.

[0059] The present invention will now be explained further utilizing FIG. 2 and the two flow charts in FIGS. 3 and 4. A monitoring unit 1 can, for example, be placed in a corner of a room and be directed so that it can cover and monitor a specific monitored area.

[0060] The monitoring can be carried out as follows. The light-sensitive sensor records 100 an image of the monitored area. In order to detect an object that, for example, can be a person, in a recorded image, it is investigated whether there is any difference between the recorded image and a reference image which is a representation of the background of the monitored area. The reference image represents the monitored area when there is no object in the image that should not be there. In a simple embodiment, a reference image is created 110. This reference image is created by combining a number of previously recorded images (B₁, B₂, . . . , B_(N)) that are stored in a set of images U. The images are combined in such a way that they reproduce as well as possible the lighting conditions in the recorded image. The reference image is then compared 120 with the recorded image in order to detect whether there has been any change in the recorded image.

[0061] The set of images U can be created before the monitoring commences. For example, a sequence of images can be recorded for one minute. During this minute the light level is varied as much as possible. Each image is represented as a matrix with m x n elements, where the size of each element at position (i, j) corresponds to the recorded intensity of the point, usually called the pixel P. Normally, the intensity varies between 0 and 255, where 0 is black and 255 is white.

[0062] Each of these N images is then converted to a vector, for example by so-called stacking in rows, or by all the pixels being placed in a vector of length mn in some other way. For stacking in rows the first row is taken first, then the second is put after it and so on. $B_{i} = {\left. \begin{bmatrix} B_{t}^{1} \\ B_{t}^{2} \\ \vdots \\ B_{i}^{n} \end{bmatrix}\mapsto{\hat{B}}_{t} \right. = \left( {B_{l}^{2},B_{l}^{2},\ldots \quad,B_{i}^{n}} \right)}$

[0063] In the next step, a large matrix M is created out of all the images stacked in rows {circumflex over (B)}_(i), i=1, . . . , N, by placing them as columns in M

M=└{circumflex over (B)} ₁ {circumflex over (B)} ₂ . . . {circumflex over (B)} _(N)┘

[0064] Finally, a so-called singular value division (SVD) of M is carried out,

M=UΣV ^(T)

[0065] where U and V are orthogonal matrices and Σ is a rectangular matrix consisting of zeros except at the locations (i, i) where the elements are called singular values. The columns in U describe the variation in the images B_(i) and the corresponding singular value describes how large a weighting the column has in the description of all the lighting conditions. In addition, the singular values are arranged in order of size, with the largest first, which means that the first column in V describes the images best, then the second describes the variations from the first best, and so on. In order to determine how many images are to be included in the set of images, either the number can be fixed or a threshold can be put upon the singular values. For example, it can be when the corresponding singular value is {fraction (1/10)} of the largest singular value. The set of images is then obtained by creating matrices of the columns in U in the same way as the columns were created out of the matrices. In this way, the set of images is obtained, U₁, . . . , U_(b). The orthogonal set obtained is not necessarily a representation of images that can be obtained from reality, but are synthetic images using which it is possible to recreate an original set of images.

[0066] The set of images is then updated gradually when the light-sensitive sensor 2 records new images which comprise light levels that are not represented in the set of images.

[0067] Images in the set of images can be stored with limited resolution. Normally it is sufficient to store one or a few images at full resolution, that is to say that each pixel is stored, and the other images at a considerably lower resolution, for example every second row and every second column are stored. This saves memory capacity.

[0068] In another embodiment according to the invention, there are a number of images in the set of images U that can reproduce a number of different lighting conditions. An image of a monitored area is recorded 200. The recorded image is called B. In order to create 210 a reference image, an algorithm is used which fits the reference image to the recorded image based on the set of images and which aims to find the linear combination of images in the set of images that conforms as well as possible to the light level in the recorded image. This is carried out by calculating coefficients c₁, . . . , c_(b) in such a way that U=c₁U₁+ . . . +c_(b)U_(b) is an optimal reference image. The coefficients are selected by solving the optimization problem ${\min\limits_{(c_{l})}{{U - B}}_{F}} = {\min\limits_{(c_{l})}{\sum\limits_{J,k}\left( {{U\left( {j,k} \right)} - {B\left( {j,k} \right)}} \right)^{2}}}$

[0069] where ∥ . . . ∥_(F) indicates the Frobenius norm. Other norms or more general functions can also be used. An advantage of using the Frobenius norm is that the coefficients can be calculated directly from the set of images by means of the formula: $c_{i} = {\left( {U_{i},B} \right) = {\sum\limits_{j,k}{{U_{i}\left( {j,k} \right)}B\left( {j,k} \right)}}}$

[0070] where (,) indicates the normal scalar product.

[0071] When the reference image has been created, a difference image is calculated 220 as the absolute amount of the difference between the reference image and the recorded image. If there are pixels that exceed 230 a certain level and these pixels constitute a coherent area of a minimum size, a divergence area is determined 240. The divergence area consists of these pixels and pixels that abut these pixels. There can be several divergence areas in one and the same difference image. Each divergence area is investigated.

[0072] If a divergence area is determined, the variance of the difference image is calculated to determine in this way whether the divergence area represents a scene change or a lighting change 250. If the variance is large, the divergence area is judged to represent a scene change and if the variance is small, the divergence area is judged to represent a lighting change. There are also other techniques for evaluating what the divergence area represents. For example, NVD (normalized vector distance) can be used, which is described in “Matsuyama, Ohya, Habe: Background subtraction for non-stationary scene, Proceedings of the fourth Asian conference on computer vision, 2000”, pages 662-667. A further technique comprises using quotients between intensities for adjacent pixels, which is described in U.S. Pat. No. 5,956,424.

[0073] If the divergence area represents a scene change and this scene change is detected in the same place in a number of consecutively recorded images 270, the scene change is judged to be persistent. For example, it can be a flower-pot that has fallen on the floor. Persistent scene changes are judged not to be critical. This persistent scene change is incorporated into the set of images by updating 260 the set of images. The updating can be such that a set of images is built up from scratch by discarding the old set of images, and using the recorded image to create a new set of images. The persistent scene change can also be incorporated gradually by, for example, storing the deviations separately in a separate set of images for only that part of the image. This can gradually be transferred to the set of images when all the lighting variations for the new object have been seen.

[0074] If a new scene change is detected, a new image of the monitored area is recorded 280. When the reference image is created, the pixels taken up by the divergence area in the recorded image are removed 290 and the reference image is created 295 from the other pixels. Assume that a scene change has been detected in the subset I⊂B of the image. Following this, the optimization problem ${\min\limits_{(c_{l})}{{{U - B}}_{F}(I)}} = {\min\limits_{(c_{l})}{\sum\limits_{{({j,k})} \notin l}\left( {{U\left( {j,k} \right)} - {B\left( {j,k} \right)}} \right)^{2}}}$

[0075] is solved, where the deviations are minimized outside the detected area. A relatively good approximation can be obtained by calculating the coefficients by $c_{i} = {\left( {U_{i},B} \right)_{l} = {\sum\limits_{{({j,k})} \notin l}{{U_{i}\left( {j,k} \right)}B\left( {j,k} \right)}}}$

[0076] The smaller the subset I, the better the approximation.

[0077] The outermost rows and columns of the pixels can advantageously be removed when calculating the reference image, as a possible intruder first appears at the edge of the image and could thus possibly affect the reference image before detection has occurred.

[0078]FIG. 5 shows a flow chart for a further embodiment according to the invention. An image of a monitored area is recorded 300. A reference image is created 310 in a way as mentioned above. When the reference image has been created, a difference image is calculated 320 as the absolute amount of the difference between the reference image and the recorded image. If there are pixels that exceed 330 a certain level and these pixels constitute a coherent area of a minimum size, a divergence area is determined 340. A new reference image is created in which the pixels taken up by the divergence area in the recorded image are removed 350 and the reference image is created 360 from the other pixels. The reference image is improved and refined by being repeated, for example, six times. If the reference image is not repeated 370 more than five times, a new difference image is calculated 320 and the process continues from there. When the image is repeated 370 more than five times, a new image of the monitored area is recorded 300 and a new reference image is created.

[0079] Even though a special embodiment of the invention has been described above, it will be obvious to a person skilled in the art that many alternatives, modifications and variations are possible in the light of the above description. 

What I claim and desire to secure by Letters Patent is:
 1. A method for monitoring a monitored area comprising the steps of recording an image of the monitored area and of comparing the recorded image with a reference image in order to determine whether there is an alarm situation, characterized by the step of creating the reference image by combining at least two previously stored images from a set of images, so that the lighting conditions in the reference image are adjusted to the lighting conditions in the recorded image.
 2. A method according to claim 1, in which the reference image is created by linear combination of said at least two previously stored images.
 3. A method according to claim 1, further comprising the steps of calculating a difference image as the difference between the reference image and the recorded image, of determining at least one divergence area in the difference image, in which at least certain pixels exceed a particular level, of determining whether the divergence area represents a scene change, and if the divergence area represents a scene change, of removing the pixels that correspond to the divergence area in the recorded image for the creation of the next reference image.
 4. A method according to claim 3, further comprising the steps of determining whether the divergence area represents a light change and, if the divergence area represents a light change, of updating the set of images.
 5. A method according to claim 3, further comprising the step of updating the set of images if the divergence area represents a scene change and if the same scene change is detected in a predetermined number of consecutively recorded images.
 6. A method according to any one of claims 3, 4 or 5, in which the step of determining whether the divergence area represents a scene change comprises the step of calculating the variance of the divergence area, and, if the variance exceeds a predetermined value, the divergence area is judged to represent a scene change.
 7. A method according to claim 1, in which at least the outermost edge of pixels in the recorded image are excluded when creating the reference image.
 8. A method according to claim 1, in which the stored images in the set of images are stored at different resolutions.
 9. A method according to claim 1, further comprising the step of creating the set of images by recording images of the monitored area under different lighting conditions and of storing one or more of these recorded images.
 10. A method according to any one of claims 4 or 5, in which the step of updating the set of images is carried out at predetermined intervals.
 11. A method according to claim 1, in which at least two images in the set of images are stored orthogonally.
 12. A method according to claim 1, in which the set of images comprises an image in which all the pixels have the same intensity.
 13. A monitoring unit for monitoring a monitored area comprising a light-sensitive sensor which is arranged to record an image of the monitored area, and a central processing unit which is arranged to compare the recorded image with a reference image in order to determine whether there is an alarm situation, characterized in that the central processing unit is further arranged to create a reference image by combining at least two previously stored images from a set of images, so that the lighting conditions in the reference image are adjusted to the lighting conditions in the recorded image.
 14. A computer program for image processing for monitoring a monitored area, which computer program is stored on a computer-readable memory medium which comprises instructions to cause the computer to record an image of the monitored area and to compare the recorded image with a reference image in order to determine whether there is an alarm situation, characterized by causing the computer to create a reference image by combining at least two previously stored images from a set of images, so that the lighting conditions in the reference image are adjusted to the lighting conditions in the recorded image.
 15. A computer program for image processing for monitoring a monitored area, which computer program is stored on a computer-readable memory medium which comprises instructions for carrying out one or more of the method steps according to claim
 3. 